Calibration of the external resistance value in the power sourcing equipment of a poe system

ABSTRACT

A calibration operation determines a resistance of a sense resistor in a POE system. A voltage measurement is taken with a first current flowing through the sense resistor. A second voltage measurement is taken with a second current flowing through the resistor. A resistance value of the sense resistor is determined based on a voltage difference between the first and second voltage measurements and a current difference between the first current and the second currents.

BACKGROUND Field of the Invention

This invention relates to calibration of a sense resistor used withpower sourcing equipment (PSE) in power over ethernet (POE)applications.

Description of the Related Art

Power sourcing equipment (PSE) compliant with IEEE 802.3 provides powerto a powered device (PD) over the Ethernet cables. The power sourcingequipment includes a smart controller that ensures that the power isprovided safely. The PSE measures the output power and shuts off powerif the load (the PD) is drawing too much power. In some applications, inorder to be considered safe the power is limited to 100W. In manyimplementations, a current sense resistor is used to measure power beingsupplied by the PSE to the PD.

Improvements in power measurement allow more precise control over thepower being supplied to the PD.

SUMMARY OF EMBODIMENTS OF THE INVENTION

Accordingly, embodiments herein provide improved knowledge of theresistance value of the sense resistor to thereby improve the accuracyof power measurement. An accurate measurement of the resistance value ofthe sense resistor allows compensation for parasitic resistance,manufacturing variations of the resistor, and long term drift in theresistance value of the resistor. That allows accurate provision ofmaximum power levels.

In one embodiment, a method includes causing a first current to gothrough a sense resistor from a first current source and measuring afirst voltage across the sense resistor resulting from the firstcurrent. The method further includes causing a second current to flowthrough the sense resistor from a second current source and measuring asecond voltage across the sense resistor resulting from the secondcurrent. A resistance value of the sense resistor is determined based ona voltage difference between the first and second voltage and a currentdifference between the first current and the second current.

In another embodiment a method includes injecting a first current at afirst node of a sense resistor from a first current source during afirst time and injecting a second current at a second node of the senseresistor from a second current source during the first time, andmeasuring a first voltage across the sense resistor and parasiticresistance. The method further includes injecting a third current at thefirst node of the sense resistor from a third current source during asecond time and injecting a fourth current at the second node of thesense resistor from a fourth current source during the second time andmeasuring a second voltage across the sense resistor and parasiticresistance. A resistance value of the sense resistor is determined, atleast in part, based on a difference between the first voltage and thesecond voltage, and a current difference between the first current andthe third current.

In another embodiment an apparatus includes a transistor having a drainnode coupled to a port and a sense resistor coupled between a sourcenode of the transistor and ground. A first current source is coupled toprovide a first current to the sense resistor and a second currentsource is coupled to provide a second current to the sense resistor. Anamplifier is coupled to a first node and a second node of the senseresistor to provide an indication of a first voltage across the senseresistor with the first current and to provide an indication of a secondvoltage across the sense resistor with the second current.

In another embodiment an apparatus includes a transistor having a firstcurrent carrying node coupled to a port. A sense resistor has a firstnode coupled to a second current carrying node of the transistor and asecond node coupled to ground. A first current source supplies a firstcurrent at a first time to the sense resistor through the first node anda second current source supplies a second current to the second node atthe first time. An amplifier circuit is coupled to the first node andthe second node of the sense resistor to provide a first voltagemeasurement indicating a first voltage across the sense resistor at thefirst time. A third current source is coupled to supply a third currentat a second time to the sense resistor through the first node and afourth current source supplies a fourth current to the second node atthe second time. The amplifier circuit provides a second voltagemeasurement indicating a second voltage across the sense resistor at thesecond time.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention may be better understood, and its numerousobjects, features, and advantages made apparent to those skilled in theart by referencing the accompanying drawings.

FIG. 1 illustrates a high level block diagram of a power sourcingequipment PSE.

FIG. 2A illustrates a high level diagram of an embodiment of acalibration system to measure the sense resistor.

FIG. 2B illustrates a high level control flow of an embodiment of acalibration system to measure the sense resistor.

FIG. 3A illustrates an embodiment that determines parasitic resistance.

FIG. 3B illustrates a high level control flow of an embodiment of acalibration system to determine parasitic resistance associated withmeasuring the sense resistor.

FIG. 3C illustrates a high level control flow of an embodiment of acalibration system that determines the resistance value of the senseresistor using two injections at the source.

FIG. 4 illustrates the additional details about the parasiticresistances associated with measuring the sense resistor.

FIG. 5A illustrates an embodiment in which current is injected on thesource terminal and the sense terminal simultaneously to measure thesense resistor.

FIG. 5B illustrates a high level control flow of an embodiment of acalibration system that determines the resistance of the sense resistorusing simultaneous current injections at both nodes of the senseresistor.

FIG. 6 illustrates an embodiment in which the current sources are all ina low voltage domain.

FIGS. 7A and 7B illustrates an embodiment that addresses currentmismatch in the current sources by swapping current sources forsimultaneous measurements.

The use of the same reference symbols in different drawings indicatessimilar or identical items.

DETAILED DESCRIPTION

FIG. 1 illustrates a high level block diagram of an integrated circuit100 used in power sourcing equipment (PSE). The PSE provides power to aload (powered device) over port 101. The integrated circuit 100 measuresthe output power being supplied to the load using a sense resistor(Rsense) 103 and control logic in the PSE shuts off the power to theload if the load is drawing too much power. For example, in anembodiment the maximum power is limited to 100W. The power measurementrequires transistor 105 to be turned on by gate control logic 107.Amplifier 109 measures the voltage across the sense resistor 103 andsupplies the analog measurement to analog to digital converter (ADC)111. The ADC 111 supplies the digital value of the sensed voltage tomicrocontroller 115 (or other control logic), which determines whetherthe measured voltage corresponds to a current indicative of a safe powerlimit. Accurate knowledge (or lack thereof) of the resistance value ofsense resistor 103 impacts the accuracy of the power measurement. Acalibration measurement of the resistance value allows compensation forparasitic resistance, manufacturing variations of the resistor, and longterm drift in the value of the resistor. That allows output of themaximum power levels with higher confidence. In addition, the approachdescribed herein allows the use of lower cost, less accurate resistors,since the actual resistance value is measured.

FIG. 2A illustrates a high level diagram of an embodiment of acalibration system used in a PSE embodiment to accurately measure thesense resistor 103. Two current sources 201 and 203 provide currents I₁and I₂ to be used to determine the value of the sense resistor 103. Inthis embodiment, the current is injected at the drain terminal 206. Thetransistor 105 is turned on by gate control logic (not shown in FIG.2A). In this embodiment, there is no load on port 101 during resistancemeasurement so as to not influence the measurement. The embodimentutilizes a two point measurement using the current sources. First thecurrent I₁ from current source 201 is injected through the drainterminal 206 through transistor 105 and into the sense resistor 103. Thedifferential amplifier 209 measures the voltage across the senseresistor as Vout=V_(s+)−+V_(s−)+V_(os), where V_(s+)is the voltagesensed on the source terminal 220, Vs− is the voltage on the senseterminal 222, and V_(os) is the offset voltage associated with thedifferential amplifier. ADC 211 supplies the voltage measurement to themicrocontroller 115 (or otherwise stores the voltage measurement). Thenthe current I₂ from current source 203 is supplied through the drainterminal 206 to the sense resistor 103 resulting in a second across thesense resistor. Differential amplifier 209 makes this second voltagemeasurement (Vout=V_(s+)−+V_(s−)+V_(os)) and the second voltagemeasurement is stored. Because two voltage measurements are made, theresistance (R) of Rsense 103 can be determined by the difference inthose voltage measurements. That is,

${R = \frac{\Delta V}{\Delta\; I}},$

where ΔV is me difference in the voltage measurements and AI is thedifference in the currents. The value of the current sources can bedetermined during manufacturing testing and ΔI stored in non volatilememory (NVM) 221. In calculating the difference between the first andsecond voltage measurements, note that the offset voltage is canceled.

Since having the gain of the amplifier 209 known is important foraccuracy, in an embodiment the gain of the amplifier is measured andstored and the stored gain value is used for appropriate compensation toprovide greater accuracy in measuring the voltage value. In addition,the accuracy of the resistance measurement is limited by the resolutionof the ADC, which should be chosen to meet desired accuracy. For the ADCimplemented, it is desirable to use as much of the range of the ADC aspossible in determining the resistance.

FIG. 2B illustrates a flow chart of the control sequence to measure theresistance value of sense resistor 103 in the embodiment of FIG. 2Awhile no load is attached to the port, e.g., during the initialproduction test of the PSE board. The programmed microcontroller 115 (orother dedicated control logic) controls the measurement sequence,including turning on the current sources at the appropriate timesthrough control signals not illustrated in FIG. 2A, ensuring thetransistor 105 is on during the voltage measurements, storing thedigital values of the voltage supplied by the ADC 211, and making thecalculations of Rsense. Such software can be stored in NVM 221 with theresults stored in SRAM 223 (or other storage locations). The measurementsequence starts in 250 by turning on current source 201 and transistor105 (if not already on). In 252, the differential amplifier 209 measuresthe voltage and the ADC 211 supplies the first measured voltage to themicrocontroller directly or by storing the first measured voltage in adesignated storage location. Next in 254, the sequence causes the I₁current source to be turned off and the I₂ current source 203 to beturned on. In an embodiment, instead of a separate I₂ current source 203being turned on, another I₁ current source 203 is turned on along withthe I₁ current source 201 to provide for a current of 2I₁. In step 256,the voltage across the resistance is measured and the result is suppliedto the microcontroller 115 or otherwise stored. In 258 the currentsource(s) are turned off and in 260 the resistance is calculated as

${R_{sense} = \frac{\Delta V}{\Delta\; I}},$

where ΔI (I₂-I₁) is known. The value of Rsense is stored for use inpower calculations by the PSE during runtime. However, the embodimentdescribed in FIGS. 2A and 2B fail to account for the parasiticresistance involved in the resistance measurement, e.g., between theamplifier inputs and the sense resistor. Given that the sense resistoris small, e.g., 0.1 Ω to 0.2 Ω, the parasitic resistance involved inresistance measurements of the sense resistor can cause significanterror.

FIG. 3A illustrates one way of determining parasitic resistanceassociated with the measurement of Rsense. The embodiment of FIG. 3Aincludes current sources 301 and 303. The current sources connect to thedrain terminal 306 through switch 307 and connect to the source terminal320 through the switch 308. For the first measurement, switch 307 isclosed and switch 308 is open. A two point measurement is performed todetermine the resistance of Rsense 103. First the current source 301 isturned on and supplies the current I₁ through transistor 105 to theresistor 103 and the voltage is measured by amplifier 309 at nodes 320and 322. Then the current source 303 supplies the current I₂ throughtransistor 105 to the resistor 103 and the voltage is measured byamplifier 309. The microcontroller or other control logic determinesRsense1=ΔV/ΔI. The first Rsense value (Rsense1) is saved, e.g., in SRAM223 or in NVM 221. Next switch 307 is opened and switch 308 is closed.The transistor 105 is turned off. A second resistance measurement ismade by first supplying the current I₁ to the source terminal 320 andmeasuring the voltage and storing the voltage measurement and thensupplying the current I₂ to the source terminal 320 and measuring thevoltage and storing the voltage measurement. The second resistancemeasurement Rsense2=ΔV/ΔI with the current being injected at the sourceterminal 320. However, Rsense1 and Rsense2 will be different due todifferent current paths resulting in different resistance values of thesense resistor. Rsense2 for the source injection=Rsense+Rparasitic.Assuming the first measurement Rsense1 was just Rsense, the parasiticresistance with the source injection path can be determined asRsense2-Rsense1. The parasitic value is saved and compensated for infuture measurements. This is necessary during operation of the PSE sincethe only way to make measurements of Rsense in an operating PSE is toturn off transistor 105 using the gate control block to isolate the portfrom the sense resistor. All operational PSE Rsense measurements aremade as Rsense2, and the parasitic resistance is subtracted from theoperational Rsense2 measurements to calculate the Rsense value. Notethat any changes in parasitic resistance due to drift or temperature canbe estimated based on the percentage change in Rsense2 measurements ascompared to the original Resense2 measurement obtained during boardtest.

The programmed microcontroller 115 controls the measurement sequence fordetermining the parasitic resistance, including turning on the currentsources at the appropriate times, causing the switches to open and closeas needed, ensuring the transistor 105 is on or off as needed during thevoltage measurements, storing the digital values of the voltage suppliedby the ADC 311, and making the calculations to determine Rsense1,Rsense2, and Rparastic. Software to control the operations to make theparasitic measurement can be stored in NVM 221 with the results storedin SRAM 223, NVM 221 (or other storage locations).

FIG. 3B illustrates the control sequence to determine the parasiticresistance associated with measuring the resistance value of senseresistor 103 in the embodiment of FIG. 3A. The programmedmicrocontroller 115 (or other dedicated control logic) controls thesequence, including turning on the current sources at the appropriatetimes, ensuring the transistor 105 is on (or off) during the voltagemeasurements, storing the digital values of the voltage supplied by theADC 311, and making the calculations of R_(sense) and R_(parasitic).Such software can be stored in NVM 221 with the results stored in SRAM223 (or other storage locations). The measurement sequence starts in 350by turning on current source 301 and transistor 105 (if not already on)and closing switch 307 and opening switch 308 to cause current I₁ to beinjected at the drain terminal 306 with no load on the port. In 352, thedifferential amplifier 309 measures the first voltage and the ADC 311supplies the first measured voltage to the microcontroller directly orby storing the first measured voltage in a designated storage location.Next in 354, the control sequence causes the I₁ current source to beturned off and the I₂ current source 303 to be turned on. In anembodiment, instead of a separate I₂ current source 303 being turned on,another I₁ current source 303 is turned on along with the I₁ currentsource 301 to provide for a current of 2I₁. In step 356, the secondvoltage across the sense resistor is measured and the result is suppliedto the microcontroller 115 or otherwise stored. In 358 the currentsource(s) are turned off and in 360 the first resistance is calculatedas

${R_{{sense}\mspace{11mu} 1} = \frac{\Delta V}{\Delta\; I}},$

where ΔI is known.

Next the second resistance measurement is made using a different currentpath, namely current injection at the source terminal 320. The secondmeasurement sequence starts in 362 by turning off transistor 105,opening switch 307, closing switch 308, and injecting current at thesource terminal 320. In 364, the differential amplifier 309 measures thethird voltage across the sense resistor and the ADC 311 supplies thethird measured voltage to the microcontroller directly or by storing thefirst measured voltage in a designated storage location. Next in 366,the control sequence turns off the current source 301 supplying I₁ andturns on the current source 303 supplying I₂. In step 368, the fourthvoltage across the sense resistor is measured and the result is suppliedto the microcontroller 115 or otherwise stored. In 370 the currentsource(s) are turned off and in 372 the resistance is calculated as

${R_{{sense}\mspace{11mu} 2} = \frac{\Delta V}{\Delta\; I}},$

where ΔI is Known. Finally, the microcontroller calculates theRparasitic=R_(sense2)-R_(sense1) in 374 and stores the measurement ofthe parasitic for use in future measurements of Rsense. Of course, thetwo resistance measurements can be stored instead of the value of theparasitic resistance. During operation, knowing the parasitic resistanceallows the PSE to make more accurate power measurements and therebysupply the maximum amount of power permitted. Note that the order ofsome of the steps shown in FIG. 3B can be changed. For example, thecalculations can be performed after all the measurements have beencompleted and injection can occur at the source before injection at thedrain.

FIG. 3C illustrates the control sequence to determine the resistancevalue of sense resistor 103 in the embodiment of FIG. 3A using a twopoint injection of currents at the source terminal 320 during runtime onthe PSE. The measurement sequence starts in 380 by isolating the port101 from Rsense by turning transistor 105 off, ensuring switch 307 isopen, and closing switch 308 to cause the current I₁ to be injected atthe source terminal 320. In 382, the differential amplifier 309 measuresthe first voltage and the ADC 311 supplies the first measured voltage tothe microcontroller directly or by storing the first measured voltage ina designated storage location. Next in 384, the control sequence causesthe I₁ current source 301 to be turned off and the I₂ current source 303to be turned on. In step 386, the second voltage across the senseresistor is measured and the result is supplied to the microcontroller115 or otherwise stored. In 388 the current source(s) are turned off andin 390 the resistance is calculated as

${R_{{sense}\mspace{11mu} 2} = \frac{\Delta V}{\Delta\; I}},$

where ΔI is known as described earlier. Together with Rsense1 andRsense2 measurements made during board testing to determine theparasitic resistance, changes in Rsense during the life of the productcan be accounted for by only measuring Rsense2 operationally andsubtracting out the parasitic resistance. As described earlier, theparasitic resistance measured at board testing may be adjusted by thepercentage change in operational Rsense2 from the board testing value ofRsense2.

FIG. 4 illustrates the additional details about the calibrationoperation illustrated in FIGS. 3A and 3B showing the locations ofparasitic resistances. Assuming the current I₁ is injected on the drainterminal 406, and assuming the resistance R 404>>Rsense, the Vs+ inputat node 402 is

Vs+=I×(Rp4+Rsense+Rp5+Rp6),

-   where Rpn are various parasitic resistances shown in FIG. 4A and I    is the current I₁ from current source 401. The Vs− input to the    differential amplifier circuit at node 412 is

Vs−=I×(Rp6),

-   also assuming the resistance R 410>>Rsense.-   Vout₁ (using the current source supplying I₁) at node 416 of the    differential amplifier 409 can be calculated as

Vout₁ ≅V _(REF)-100(I ₁×(Rp4+Rsense+Rp5)+Vos).

-   The voltage measurement is repeated for I=I₂ from the current source    403.

Vout₂ ≅V _(REF)-100(I ₂×(Rp4+Rsense+Rp5)+Vos).

-   ΔVout=100(ΔI×(Rp4+Rsense+Rp5)), where ΔI is the difference between    the currents I₁ and I₂ and ΔVout is the difference in the two    voltage measurements Vout₁ and Vout₂.-   Thus,

(Rp4+Rsense+Rp5)=ΔVout/(100ΔI).

Then the switch 407 is opened and the switch 408 closed. The transistor105 is turned off. Current from the two current sources is sequentiallyinjected on the source terminal 420 resulting in (for the I₁ currentinjection):

Vs+=I ₁×(Rp1+Rp2+Rp4+Rsense+Rp5+Rp6),

V _(s−) =I×(Rp6),

Vout₁ ≅V _(REF)-100(I ₁×(Rp1+Rp2+Rp4+Rsense+Rp5)+Vos),

The voltage measurement is repeated for I₂ from the current source 403and Vout₂≅V_(REF)-100(I₂×(Rp1+Rp2+Rp4+Rsense+Rp5)+Vos),

-   ΔVout=100(ΔI×(Rp1+Rp2+Rp4+Rsense+Rp5)), where ΔI=I₂-I+ and    ΔVout=Vout₁-Vout₂; and

(Rp1+Rp2+Rp4+Rsense+Rp5)=ΔVout/(100ΔI)

Using the drain measured resistance value, the parasitic resistance canbe determined from,

(Rp1+Rp2+Rp4+Rsense+Rp5)−(Rp4+Rsense+Rp5)=(Rp1+Rp2).

-   Microcontroller 115 (or other control logic), controls the switches    and current sources, makes the calculations described and stores the    parasitic resistance value along with the value of (Rp4+Rsense+Rp5)    in memory if needed. The parasitic resistance value can be used    during operation of the PSE to more accurately determine power being    supplied to the load. The source injection measurements can be    repeated during operation to ensure that accurate resistance values    are maintained to compensate for, e.g., temperature changes or other    resistance drift.

FIG. 5A illustrates another embodiment in which current is injected onthe source terminal 520 and the sense terminal 522 simultaneously. Withreference to FIG. 5A, with switches 510 and 512 closed, and switch 514open, current sources 501 and 502 simultaneously supply current to thesource terminal 520 and the sense terminal 522, respectively. Thatresults in the Vs+ input at node 532 being

Vs+==I ₁×(Rp1+Rp2+Rp4+Rsense+Rp5+2×Rp6),

-   where Rpn are the various parasitic resistances shown in FIG. 5A and    I₁ is the current from current source 501. The Vs− input at node 534    is

Vs−=I ₁×(Rp1+Rp2+2×Rp6)),

-   where I₁ is the current from the current source 502. The current    sources are assumed to be well matched and supply equal I₁ currents    but in embodiments, the current sources are measured, e.g., in    production test and the current values are stored in non-volatile    memory. That way any differences in the current sources can be    accounted for during the voltage calculations.-   It is assumed that the resistances R 516 and 518>>Rsense. Vout at    node 524 for the I₁ current sources can be calculated as

Vout₁ =V _(REF)-100(I ₁×(Rp4+Rsense+Rp5)+Vos)

-   The voltage measurement is repeated with current source 503 and 504    simultaneously supplying the current I₂ to the source node 520 and    the sense node 522, respectively.-   Vs+=I₂×(Rp1+Rp2+Rp4+Rsense+Rp5+2×Rp6), where Rpn are the various    parasitic resistances shown in FIG. 5A and I₂ is the current from    current source 503. The Vs− input at node 534 is

Vs−=I ₂×(Rp1+Rp2+2×Rp6)),

-   where I₂ is the current from the current source 504. The current    sources are assumed to be well matched and supply equal I₂ currents    but in embodiments, the current sources are measured, e.g., in    production test and the current values are stored in NVM. That way    any differences in the current sources can be accounted for during    the voltage calculations.-   It is assumed that the resistances R 516 and 518>>Rsense. Vout at    node 524 for the I₂ current sources can be calculated as

Vout2≅V _(REF)-100(I ₂×(Rp4+Rsense+Rp5)+Vos)

-   Again, the current sources are assumed to be well matched and supply    equal I₂ currents but in embodiments the values of the current    sources are measured during production test and stored in NVM for    use during sense resistor measurement. Mismatch in the current    sources can be compensated for digitally or as described further    herein. With two voltage measurements made from the two pairs of    current sources,-   ΔVout=100(ΔI×(Rp4+Rsense+Rp5), where ΔVout=(Vout ₂-Vout₁) and ΔI is    the difference in the currents (I₂-I₁). Thus, the resistance used    for a current measurement to determine if the power supplied to the    load is within appropriate limits is given by,    (Rp4+Rsense+Rp5)=ΔVout/(100ΔI). While Rp4 and Rp5 and parasitic    resistances, those resistances are part of the sense resistance and    thus when measuring the voltage across the sense resistance, the    parasitic resistances Rp4 and Rp5 are necessarily present and    considered part of Rsense for measurement purposes. While switch 514    is shown in the embodiment of FIG. 5A, other embodiments omit the    switch.

The topology shown in FIG. 5A turns both Vos and the parasiticresistances Rp1 and Rp2 into a common mode signal. That is effectivewithin the matching of the currents and assuming that Rp and Rp2 in theupper and lower legs are also well matched. This is effective if:

-   (1) ΔI mismatch×(Rp1+Rp2) <<Rsense, and-   (2) Rp1 mismatch+Rp2 mismatch<<Rsense.-   Both conditions are met when (Rp1+Rp2)<<Rsense. That suggests that    mismatch of the current sources and Rp should be minimized to the    extent possible.

FIG. 5B illustrates the control sequence to determine the resistancevalue of sense resistor 103 in the embodiment of FIG. 5A by injectingcurrents simultaneously at the source terminal 520 and the senseterminal 522 during the voltage measurements. The measurement sequencestarts in 550 ensuring transistor 105 is off, opening switch 514 andclosing switches 510 and 512 to cause current I₁ from current source 501to be injected at the source terminal 520 and the I₁ current fromcurrent source 502 to be injected at the same time at the sense terminal522 during the voltage measurement. In 552, the differential amplifier509 measures the first voltage and the ADC 511 supplies the firstmeasured voltage to the microcontroller directly or by storing the firstmeasured voltage in a designated storage location. Next in 554, thecontrol sequence causes the I₁ current sources to be turned off and theI₂ current sources 503 and 504 to be turned on to inject the I₂ currentat source terminal 520 and at the same time inject an I₂ current at thesense terminal 522 during the voltage measurement. In step 556, thesecond voltage across the sense resistor is measured and the result issupplied to the microcontroller 115 or otherwise stored. In 558 thecurrent sources are turned off and in 560 the resistance is calculatedas

${R_{sense} = \frac{\Delta V}{\Delta\; I}},$

where ΔI is known. The order of certain of the steps shown in

FIG. 5B can be changed such as measuring the voltage resulting from theI₂ current sources first. The embodiment(s) described by FIGS. 5A and 5Bcan be used operationally to periodically measure Rsense (withtransistor 105 off) and account for changes in Rsense over time.

FIG. 6 illustrates an embodiment in which the current sources 601, 602,603, and 604 are all in a low voltage domain (e.g., 3V) as opposed tothe embodiment of FIG. 5A in which current sources 501 and 503 are in ahigh voltage domain (e.g., 60 V). That allows better matching of the twocurrent sources and also provides for lower power consumption. I₁ and I₂in the various embodiments shown herein, e.g., in FIGS. 2A, 3A, 4, 5A,6, 7A, and 7B should have sufficient current scaling between them. Forexample, in embodiments, I₁ is 20 mA and I₂ is 40 mA but otherembodiments use different currents that are appropriate for theparticular application.

In order to address current mismatch in the current sources, anembodiment swaps the current sources that are coupled to the source andsense terminals during measurements and the measurements are averaged.Referring to FIGS. 7A and 7B assume the calibration current I₁ fromcurrent sources 701 and 702 have a nominal value of I₁ and differ by 10percent from the nominal value. The first voltage measurement suppliesthe current I₁×1.1 from current source 701 to the source terminal 720and supplies the current I₁×0.9 from current source 703 to the senseterminal 722. Injection on the source terminal 720 from current source701 results in

Vsource=I₁×[1.1×(Rp2+Rp4+Rsense+Rp5+Rp6)+(0.9×Rp6)].

-   Injection on the sense terminal 722 from current source 702 results    in

Vsense=I₁×[0.9×(Rp2+Rp6)+(1.1×Rp6)].

Vsource-Vsense−=I₁×[1.1×(Rp4+Rsense+Rp5)+(0.2×Rp2)]

The current sources are then swapped through additional switches notshown and for the second voltage measurement current source 702 suppliesthe current I₁×0.9 to the source terminal 720 and current source 701supplies the current I₁×1.1 to the sense terminal 722. For the secondvoltage measurement, injection on the source terminal from currentsource 702 results in

Vsource=I₁×[0.9×(Rp2+Rp4+Rsense+Rp5+Rp6)+(1.1×Rp6)],

-   Injection at the sense terminal from current source 701

Vsense=I₁×[1.1(Rp2+Rp6)+(0.9×Rp6)],

Vsource-Vsense=I ₁[0.9×(Rp4+Rsense+Rp5)-(0.2×Rp2)]

In order to address the current mismatch, the two voltage measurementsare averaged resulting in,

-   Average(Vsource-vsense)=I₁×(Rp4+Rsense+Rp5).-   The voltage measurements are then repeated for the current sources    supplying I₂ (not shown in FIGS. 7A and 7B) and averaged in the same    manner as for I₁.

Note that averaging has no impact on Rp2 mismatch, so for a 1%calibration Rp2 should be matched, e.g., within 1 mOhm. For ease ofillustration, Rp1 was omitted from FIGS. 7A and 7B. Any difference inbondwire length or other known mismatch can be compensated for digitallyin computing the resistance value of the sense resistor

Measuring the resistance of Rsense using the source path (after havingpreviously made the drain path injection) or measuring by injectingsimultaneously at the source and sense nodes, allows a load to be on theport terminal during measurements. That assumes that the external loaddoes not change during the measurements. Given the POE environment, theexternal load should generally be stable. Of course, measurements can bemade injecting at the source terminal with transistor 105 off or byinjecting at the source and sense terminals simultaneously withtransistor 105 off. An accurate resistance measurement can then be usedto accurately measure power being supplied to the load by measuring thevoltage across the sense resistor.

Thus, various aspects of a calibration system to measure the resistancevalue of a sense resistor in a POE environment. The description of theinvention set forth herein is illustrative, and is not intended to limitthe scope of the invention as set forth in the following claims. Othervariations and modifications of the embodiments disclosed herein, may bemade based on the description set forth herein, without departing fromthe scope of the invention as set forth in the following claims.

What is claimed is:
 1. A method comprising: causing a first current togo through a sense resistor from a first current source; measuring afirst voltage across the sense resistor resulting from the firstcurrent; causing a second current to go through the sense resistor froma second current source; measuring a second voltage across the senseresistor resulting from the second current; and determining a resistancevalue of the sense resistor based on a voltage difference between thefirst and second voltage and a current difference between the firstcurrent and the second current.
 2. The method as recited in claim 1further comprising: injecting the first current from the first currentsource at a first current carrying node of a transistor; injecting thesecond current from the second current source at the first currentcarrying node of the transistor; and wherein the sense resistor isbetween a second current carrying node of the transistor and ground. 3.The method as recited in claim 1 further comprising: making a firstresistance measurement of the sense resistor using a first current path,the first current path including a transistor; turning the transistoroff after making the first resistance measurement; making a secondresistance measurement of the sense resistor with the transistor offusing a second current path that bypasses the transistor; anddetermining parasitic resistance in the second current path based on thefirst resistance measurement and the second resistance measurement. 4.The method as recited in claim 3 wherein making the first resistancemeasurement includes, injecting the first current at a first currentcarrying node of the transistor and measuring the first voltage;injecting the second current at the first current carrying node of thetransistor and measuring the second voltage; determining a firstresistance value of the sense resistor for the first resistancemeasurement based on the voltage difference between the first voltageand the second voltage and the current difference between the firstcurrent and the second current; and wherein making the second resistancemeasurement includes, injecting current from the first current source ata first node of the sense resistor, the first node being coupled to asecond current carrying node of the transistor; measuring a thirdvoltage across the sense resistor; injecting current from the secondcurrent source at the first node of the sense resistor; measuring afourth voltage across the sense resistor; and determining a secondresistance value of the sense resistor for the second resistancemeasurement based on the current difference and a second voltagedifference between the third voltage and the fourth voltage.
 5. Themethod as recited in claim 3 wherein the sense resistor is coupledbetween a current carrying node of the transistor and ground.
 6. Amethod comprising: injecting a first current at a first node of a senseresistor from a first current source during a first time; injecting asecond current at a second node of the sense resistor from a secondcurrent source during the first time; measuring a first voltage acrossthe sense resistor and parasitic resistance; injecting a third currentat the first node of the sense resistor from a third current sourceduring a second time; injecting a fourth current at the second node ofthe sense resistor from a fourth current source during the second time;measuring a second voltage across the sense resistor; and determining aresistance value of the sense resistor based at least in part, on adifference between the first voltage and the second voltage, and acurrent difference between the first current and the third current. 7.The method as recited in claim 6 wherein the first current and thesecond current are nominally equal and the third current and the fourthcurrent are nominally equal and the first current and the third currentare different.
 8. The method as recited in claim 6 further comprisingperiodically measuring the resistance value with a transistor turned on,the transistor having a first current carrying node coupled to a port towhich a load is attached and a second current carrying node coupled tothe first node of the sense resistor.
 9. The method as recited in claim6 further comprising periodically measuring the resistance value with atransistor turned off the transistor having a first current carryingnode coupled to a port to which a load is attached and a second currentcarrying node coupled to the first node of the sense resistor.
 10. Themethod as recited in claim 6 further comprising using the resistancevalue to determine power being provided to a load through a port coupledto the sense resistor.
 11. An apparatus comprising: a transistor havinga first current carrying node coupled to a port; a sense resistorcoupled between a second current carrying node of the transistor andground; a first current source coupled to provide a first current to thesense resistor; a second current source coupled to provide a secondcurrent to the sense resistor; and an amplifier coupled to a first nodeand a second node of the sense resistor to provide an indication of afirst voltage across the sense resistor with the first current and toprovide an indication of a second voltage across the sense resistor withthe second current.
 12. The apparatus as recited in claim 11 furthercomprising: control logic to cause the first current to be supplied tothe sense resistor and to store the indication of the first voltageacross the sense resistor; the control logic further configured to causethe second current to be supplied to the sense resistor and to store theindication of the second voltage across the sense resistor; and whereina first value of the sense resistor is determined according to a voltagedifference between the first voltage and the second voltage and acurrent difference between the first current and the second current. 13.The apparatus as recited in claim 12 wherein, the control logic isconfigured to cause the first current from the first current source tobe injected at the first current carrying node at a first time; thecontrol logic is configured to cause the second current from the secondcurrent source to be injected at the first current carrying node of thetransistor at a second time; the control logic is configured to turn offthe transistor and cause a current from the first current source to beinjected at the second current carrying node of the transistor at athird time and to store a third voltage measurement; the control logicis configured to cause a current from the second current source to beinjected at the second current carrying node of the transistor at afourth time and to store a fourth voltage measurement; and wherein asecond value of the sense resistor is based on the current differencebetween the current from the first current source injected at the thirdtime and the current from the second current source injected at thefourth time and a voltage difference between the third voltagemeasurement and the fourth voltage measurement.
 14. The apparatus asrecited in claim 13 wherein a parasitic resistance is determined basedon the first value of the sense resistor and the second value of thesense resistor.
 15. The apparatus as recited in claim 12 furthercomprising: wherein the control logic causes the first current to beinjected at the second current carrying node of a transistor; andwherein the control logic causes the second current to be injected atthe second current carrying node of the transistor.
 16. The apparatus asrecited in claim 15 wherein the control logic is configured to turn offthe transistor during measurement of the second voltage across the senseresistor.
 17. An apparatus comprising: a transistor having a firstcurrent carrying node coupled to a port; a sense resistor having a firstnode coupled to a second current carrying node of the transistor and asecond node coupled to ground; a first current source coupled to supplya first current at a first time to the sense resistor through the firstnode; a second current source to supply a second current to the secondnode at the first time; an amplifier circuit coupled to the first nodeand the second node of the sense resistor to provide a first voltagemeasurement indicating a first voltage across the sense resistor at thefirst time; a third current source coupled to supply a third current ata second time to the sense resistor through the first node; a fourthcurrent source to supply a fourth current to the second node at thesecond time; and wherein the amplifier circuit provides a second voltagemeasurement indicating a second voltage across the sense resistor at thesecond time.
 18. The apparatus as recited in claim 17 wherein the firstcurrent and the second current are substantially equal and wherein thethird current and the fourth current are substantially equal.
 19. Theapparatus as recited in claim 17 further comprising: control logic tocause the first and second current sources to be coupled to the firstand second nodes, respectively, during the first time; wherein thecontrol logic causes the third and fourth current sources to be coupledto the first and second nodes, respectively, during the second time; andwherein the control logic determines resistance of the sense resistorbased on, at least in part, the first voltage measurement, the secondvoltage measurement, and a difference between the first current and thethird current.
 20. The apparatus as recited in claim 17 wherein avoltage domain of the third and fourth current sources has a lowervoltage as compared to a voltage domain associated with the transistor.